package top.zhangjianyong.blog.config.blog;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 项目配置类
 *
 * @author zhangjianyong
 * @since 2024/7/19 下午12:29
 */
@Data
@Accessors(chain = true)
@Configuration
@ConfigurationProperties(prefix = "blog")
public class BlogConfig {
  private IdSequence idSequence;

  private Email email;

  private File file;

  @Setter
  @Getter
  public static class IdSequence {
    private Long workerId;
    private Long dataCenterId;
  }

  @Setter
  @Getter
  public static class Email {
    private String account;
    private String password;
    private String smtpHost;
  }

  @Setter
  @Getter
  public static class File {
    private String path;
  }
}
